import App from './App'

// #ifndef VUE3
import Vue from 'vue'
//icon图标css
import '@/static/font/iconfont.css'
//用myRequest方法接收一下
import {myRequest} from '@/util/api.js'
Vue.config.productionTip = false
//挂载到全局上
Vue.prototype.$myRequest = myRequest;
App.mpType = 'app'

import UniIcons from '@/uni-icons/components/uni-icons/uni-icons.vue'
Vue.component('uniIcons',UniIcons)
//定义全局的过滤器
Vue.filter('formatDate',(date)=>{
	const nDate = new Date(date);
	const year = nDate.getFullYear();
	const month = nDate.getMonth().toString().padStart(2,0);
	const day = nDate.getDate().toString().padStart(2,0);
	return year+"-"+month+"-"+day
})
const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif